REQUESTFILE title "Select name for Fontlist." path Pathname"//" File Fontlist
NameOfFile = Result
end
Ok=open(Fontsfile,Pathname"/UFST/FontList","R") /* Count lines. not possible with WW5.*/
Lines=-1
do until eof(Fontsfile)
Lines=Lines+1
b=readln(Fontsfile)
end
if Lines > 80 then do
Dot="."
do until ((Parts<(Lines/5))&(Parts>=1))
wizardreq title "How many Parts?" label "You have installed "||Lines||" fonts." label "It may be that you don't have enough memory to" label "show all at once. Split the Fontlist in how many parts:" label "Recommended: at least "||((Lines%80)+1) textbox 1 "_Parts:" Button 1 "_Ok" Button "-1" "_Cancel"
if result = "-1" then do
exit
end
else do
nop
end
Wizard_Gettextbox (1)
Parts=Result
if (Parts>=(Lines/5))|(Parts<1) then do
Wizardreq Title "Problem" label "Your answer makes no sense." label "You have installed "||Lines||" fonts." Button 1 "_OK" Button "-1" "_Cancel"
if result = "-1" then do
Exit
end
end
end
if Parts>1 then do
wizardreq Title "Attention!" label "The parts will be named" label NameOfFile||".1 to" label NameOfFile||"."||Parts button 1 "_OK" button 2 "_Select new name" button "-1" "_Cancel"
PressedButton=Result
select
When PressedButton=2 then do Until NameOfFile~=""
REQUESTFILE title "Select name for fontlist." path Pathname"//" File Fontlist
NameOfFile = Result
end
When PressedButton="-1" then do
exit
end
otherwise do
nop
end
end
end
end
else do
Parts=1
end
Remains=0
do Part = 1 to Parts
open Filename Pathname"/UFST/FontList" force
saveas name NameOfFile /*Change name of File, so that Env:Wordworth/Fontlist is not changed by mistake.*/